package com.base.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.base.po.voip.Withdrawals;
import com.base.utils.Page;
import org.apache.ibatis.annotations.Param;

public interface WithdrawalsService {

	int deleteByPrimaryKey(String id);

	int insert(Withdrawals record);

	int insertSelective(Withdrawals record);

	Withdrawals selectByPrimaryKey(String id);

	int selectByCount(String userid);

	List<Withdrawals> selectByAll(Page page, String userid);

	List<Withdrawals> selectByStatus(@Param("status") Integer status, @Param("userid") String userid, @Param("type") Integer type);

	int updateByPrimaryKeySelective(Withdrawals record);

	int updateByPrimaryKey(Withdrawals record);

	BigDecimal selectAllMoney(@Param("parentid")String parentid, @Param("begin") Date begin, @Param("end") Date end);

	int countAll(@Param("parentid")String parentid, @Param("begin") Date begin, @Param("end") Date end);

	// 计算用户消费积分
	float countByAlready(String userid, Integer type, Integer status);

	// 计算用户消费特权积分
	float countByAlreadyTime(@Param("userid") String userid, @Param("type") Integer type, @Param("begin") Date begin,
							 @Param("end") Date end);
}
